﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DOM;
using MOD;

namespace BIZ
{
   public class TeacherSelectCourseBIZ
    {
        public TeacherSelectCourseBIZ()
        {
            //
            // TODO: 在此处添加构造函数逻辑
            //
        }
        public DataTable SelectAllCourseFromCourseTable()
        {
            CourseDOM course = new CourseDOM();
            DataTable dt = new DataTable();
            dt = course.SelectAll();
            return dt;
        }
       public DataTable SelectSection()
       {
           SectionDOM section = new SectionDOM();
           DataTable dt = new DataTable();
           dt=section.SelectAll();
           return dt;
       }
       
       public bool Select(string id,string userId)
       {
          // CourseDOM course = new CourseDOM();
           SectionDOM sect = new SectionDOM();
           List<CourseInfo> info = new List<CourseInfo>();
           CourseInfo courseInfo = new CourseInfo();
           
           info = sect.SelectCourse(id);
           courseInfo = info[0];
           bool b = false;
           b = sect.InsertSection(userId, courseInfo);
           return b;

       }
       public bool DelSection(Int32 sectionId)
       {
           SectionDOM sect = new SectionDOM();
           List<CourseInfo> info = new List<CourseInfo>();
           bool b=false;
           b = sect.DeleteSection(sectionId);
           return b;

       }
    }
}
